;;;
;;;	Author: Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;
;;;	http://www.paracadd.com
;;;	All rights reserved.
;;;
;;;	Copyright:
;;;	   Edited:
;;;
(DEFUN c:deletesectionbystyle ( / this-section section_ss thisobj anobj cnt ename SectionStyleSS)
  (vl-load-com)
  (SETQ this-section (ENTSEL "Select section with style to delete"))
  (WHILE
    (NOT (AND this-section (EQ (CDR (ASSOC 0 (ENTGET (CAR this-section)))) "AECC_SECTION")))
    (SETQ this-section (ENTSEL "Select section with style to delete"))
  )
  (setq thisobj (vlax-ename->vla-object (CAR this-section))
        StyleToDelete (VLAX-GET-PROPERTY thisobj 'StyleName)
  )
  (setq section_ss (ssget "X" '((0 . "AECC_SECTION"))))
  (SETQ cnt 0)
  (WHILE (< cnt (SSLENGTH section_ss))
    (setq ename (SSNAME section_ss cnt))
    (setq anobj (vlax-ename->vla-object ename))
    (IF (EQ (VLAX-GET-PROPERTY anobj 'StyleName) StyleToDelete)
      (ENTDEL ename)
    )
    (SETQ cnt (1+ cnt))
  )
  (PRINC)
)
(DEFUN c:selectsectionsbystyle ( / this-section section_ss thisobj anobj cnt ename SectionStyleSS)
  (vl-load-com)
  (SETQ this-section (ENTSEL "Select section with desired style"))
  (WHILE
    (NOT (AND this-section (EQ (CDR (ASSOC 0 (ENTGET (CAR this-section)))) "AECC_SECTION")))
    (SETQ this-section (ENTSEL "Select section with desired style"))
  )
  (setq thisobj (vlax-ename->vla-object (CAR this-section))
        StyleToDelete (VLAX-GET-PROPERTY thisobj 'StyleName)
  )
  (setq section_ss (ssget "X" '((0 . "AECC_SECTION"))))
  (SETQ SectionStyleSS (SSADD))
  (SETQ cnt 0)
  (WHILE (< cnt (SSLENGTH section_ss))
    (setq ename (SSNAME section_ss cnt))
    (setq anobj (vlax-ename->vla-object ename))
    (IF (EQ (VLAX-GET-PROPERTY anobj 'StyleName) StyleToDelete)
      (SSADD ename SectionStyleSS)
    )
    (SETQ cnt (1+ cnt))
  )
  (PRINC)
)